package com.example.accessingdatajpa.service;

import com.example.accessingdatajpa.pojo.Picture;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import java.io.IOException;

public interface IPictureService {
    //insert a picture
    @Transactional
    void insertPic(Picture picture, MultipartFile file) throws IOException;

    //find a picture by id
    @Transactional
    void queryPicById(Long pictureId, HttpServletResponse response) throws IOException;

    //update the picture by id
    @Transactional
    void updatePicById(Long pictureId, MultipartFile file) throws IOException;
}
